<!-- <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
</head>
<body>
    <div>
        全部</a>
        <a href="{:U('listICreated')}">我创建的</a>
        <a href="{:U('listIRespon')}">我负责的</a>
        <a href="{:U('listIRelated')}">与我相关</a>
    </div>
    <span style="display: none">{$type}</span>
    <ul><volist name="list" id="item" key="key" >
        <li class="item" data-id="{$item.id}">
            <pre>{:json_encode($item,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT)}</pre>
            <p>创建日期:{:date("Y-m-d",$item["create_time"])}</p>
        </li>
    </volist></ul>
    <div>
        <button onclick="create()">新建</button>
        <button onclick="modify()">修改</button>
        <button onclick="handover()">移交</button>
    </div>
    <style>
        .selected{
            background-color:darkseagreen;
        }
    </style>
    <script>
        $(".item").click(function(){
            var obj=$(this);
            obj.siblings().removeClass("selected");
            obj.addClass("selected");
            // $(this).data("id");
        });
        function create(){
            location.href='{:U("create")}';
        }
        function modify(){
            var id=$(".selected").eq(0).data("id");
            var url="{:U('modify',['id'=>'4w9f6vc9d02r3k3e'])}";
            url=url.replace("4w9f6vc9d02r3k3e",id);
            location.href=url;
        }
        function handover(){
            var id=$(".selected").eq(0).data("id");
            var url="{:U('handover',['id'=>'4w9f6vc9d02r3k3e'])}";
            url=url.replace("4w9f6vc9d02r3k3e",id);
            location.href=url;
        }
    </script>
</body>
</html> -->

<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html charset=gb2312">
    <title>客户管理</title>
    <script src="__PUBLIC__/js/jquery-1.7.2.min.js" type="application/javascript"></script>
    <script src="__PUBLIC__/js/leftSlide.js" type="application/javascript"></script>
    <link href="__PUBLIC__/css/style.css" type="text/css" rel="stylesheet">
    <script type="application/javascript">
        //页面加载事件
        $(function () {
            init();
            GetListPageFun();
            //输入关键字按回车键进行搜索
            $("#keyWordes").on('keypress', function (e) {
                var keycode = e.keyCode;
                var searchName = $(this).val();
                if (keycode == '13') {
                    e.preventDefault();
                    GetListPageFun();
                }
            });
        });
        //点击头部导航栏执行方法
        function titleChange(el) {
            $(".listNavActine").removeClass("listNavActine");
            $(el).addClass("listNavActine");
        }
        //返回上一个页面执行方法
        function goBeforePage() {
            history.go(-1);
        }
        //前往新增页面
        function goAdd() {
            location.href='{:U("create")}';
        }
        //前往修改页面
        function goEditPage(id) {
            // var id=$(".selected").eq(0).data("id");
            var url="{:U('modify',['id'=>'4w9f6vc9d02r3k3e'])}";
            url=url.replace("4w9f6vc9d02r3k3e",id);
            location.href=url;
        }
        //移交方法
        function goHandOver(id) {

        }
        //点击列表内容进入查看页面
        function goViewPage(id) {
            // var id=$(".selected").eq(0).data("id");
            var url="{:U('modify',['id'=>'4w9f6vc9d02r3k3e'])}";
            url=url.replace("4w9f6vc9d02r3k3e",id);
            location.href=url;
        }
        //点击搜索按钮进行搜索
        function search() {
            GetListPageFun();
        }
        //点击显示隐藏搜索栏
        function searchShow() {
            var display = $(".listSearch").css("display");
            if (display == "none") {
                $(".listSearch").show();
                $(".listNav").hide();
            } else {
                $(".listNav").show();
                $(".listSearch").hide();
            }
        }
        //请求获取数据
        function GetListPageFun() {
        }
    </script>
</head>

<body style="background-color: #EFEFF4;">
    <div class="listHeader">
        <div class="listHeaderLeft" onclick="goBeforePage()">
            <img src="__PUBLIC__/img/return.png" alt="返回">
        </div>
        <div class="listHeaderCenter font-big">
            客户管理
        </div>
        <div class="listHeaderRight">

        </div>
    </div>
    <div class="listNav">
            <a href="{:U('listAll')}">
        <div class="listNavConter listNavActine font-small" onclick="titleChange(this)">
            全部客户
        </div>
        </a>
        <a href="{:U('listAll')}">
        <div class="listNavConter font-small" onclick="titleChange(this)">
            我创建的
        </div>
    </a>
        <a href="{:U('listAll')}">
        <div class="listNavConter font-small" onclick="titleChange(this)">
            我负责的
        </div>
    </a>
        <a href="{:U('listAll')}">
        <div class="listNavConter font-small" onclick="titleChange(this)">
            与我相关
        </div>
    </a>
    </div>
    <div class="listSearch">
        <div class="col-10 icon-left font-xlarge" onclick="searchShow()">
            ×
        </div>
        <div class="col-70 icon-center">
            <div class="col-15" style="text-align: center">
                <img src="__PUBLIC__/img/searchtop.png" alt="搜索">
            </div>
            <div class="col-85" tapmode>
                <input id="keyWordes" name="keyWordes" type="search" placeholder="搜索客户名称">
            </div>
        </div>
        <div class="col-15 icon-left font-medium" style="width: 19%;" onclick="search()">
            搜索
        </div>
    </div>
    <div class="listConter">
        <volist name="list" id="item" key="key" >
            <div class="line-wrapper">
                <div class="line-scroll-wrapper">
                    <div class="line-normal-wrapper" onclick="goViewPage('{$item.id}')">
                        <div class="line-normal-left-wrapper">
                            <div class="line-normal-info-wrapper">
                                <div class="line-normal-user-name font-xsmall">客户名称：{$item.name}</div>
                                <div class="line-normal-msg font-xsmall">联系方式：{$item.phone}</div>
                                <div class="line-normal-time font-xsmall">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：{$item.address}</div>
                            </div>
                            <div class="line-normal-info-wrapper-right font-medium" style="color: limegreen;">
                                {$item.status}
                            </div>
                        </div>
                    </div>
                    <div class="line-btn-delete">
                        <button class="font-medium" style="background-color: limegreen" onclick="goEditPage('1')">修改</button>
                        <button class="font-medium" style="background-color:#4BCAED" onclick="goHandOver('1')">移交</button>
                    </div>
                </div>
            </div>
        </volist>
    </div>
    <div class="cottomSearch" onclick="searchShow()">
        <img src="__PUBLIC__/img/searchright.png" alt="搜索">
    </div>
    <div class="cottomAdd" onclick="goAdd()">
        <img src="__PUBLIC__/img/add.png" alt="新增">
    </div>
</body>

</html>